package net.myjung.spring;

import java.util.ArrayList;
import java.util.List;

import net.myjung.model.BaseObject;
import net.myjung.model.annotation.MdlClass;
import net.myjung.model.annotation.MdlElement;
import net.myjung.model.annotation.MdlField;

@MdlClass(name = "List")
@SuppressWarnings("serial")
public class SprList extends BaseObject {
	@MdlField(type = "net.myjung.spring.SprProperty")
	private SprProperty _parent;
	@MdlElement(type = "string")
	private List<String> value;

	public SprProperty get_parent() {
		return _parent;
	}
	public void set_parent(SprProperty _parent) {
		this._parent = _parent;
	}
	public List<String> getValue() {
		return value;
	}
	public void setValue(List<String> value) {
		this.value = value;
	}
	public void addValue(String value) {
		if (this.value == null)
			this.value = new ArrayList<String>();
		this.value.add(value);
	}
	public void removeValue(String value) {
		if (this.value == null || !this.value.contains(value))
			return;
		this.value.remove(value);
	}
}